#include "bsp_timer.h"
#include "bsp_led.h"


void Led_Task(void)
{
    static uint32_t dwLedTick = 0;
    static uint32_t dwRunCnt=0;

    if (GetSysTick() - dwLedTick > 500)
    {
        if(!(dwRunCnt%2))
        {
            R_IOPORT_PinWrite(&g_ioport_ctrl, run_led, BSP_IO_LEVEL_LOW);
        }
        else
        {
            R_IOPORT_PinWrite(&g_ioport_ctrl, run_led, BSP_IO_LEVEL_HIGH);
        }
        dwRunCnt++;
        dwLedTick = GetSysTick();
    }
}
